<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
<jsp:include page="/WEB-INF/jsp_lib/validate.jsp" />
	<script type="text/javascript" src="${path}/style_lib/upload/swfupload/swfupload.js"></script>
	<%-- <script type="text/javascript" src="${path}/style_lib/upload/swfupload/swfupload.queue.js"></script> --%>
	<script type="text/javascript" src="${path}/style_lib/upload/swfupload/fileprogress.js"></script>
	<script type="text/javascript" src="${path}/style_lib/upload/swfupload/handlers.js"></script>
<script type="text/javascript">
	$(function() {
		$("#form1").validate({
			rules : {
				'witness' : {
					required : true
				}
			}
		});
	});
	
	function uploadSuccess(file, serverData) {
	        var end = $.parseJSON(serverData);
	        $("#main_pic").html(end.file_name);
			$("input[name='file_id']").val(end.file_id);
	}
       $(function(){
           var upload1 = new SWFUpload({
			
			// Backend Settings
			upload_url : "${path}/swfupload.htm",
			//post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},
			// File Upload Settings
			file_size_limit : "1200 MB",	// 100MB
			file_types : "*.gif;*.jpg;*.jpeg;*.bmp;*.png;*.txt;*.doc;*.xls;*.pdf;*.ppt;*.docx;*.xlsx;*.pptx;*.rar;*.zip",
			file_upload_limit : 1,

			// Event Handler Settings (all my handlers are in the Handler.js file)
			swfupload_preload_handler : preLoad,
			swfupload_load_failed_handler : loadFailed,
			file_dialog_start_handler : fileDialogStart, 
			file_queued_handler : fileQueued,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,

			// Button Settings
			button_placeholder_id : "filePicker",
			button_width: 80,
			button_height: 22,
			button_text:"上传资料",
			
			// Flash Settings
			flash_url : "${path}/style_lib/upload/swfupload/swfupload.swf",
			flash9_url : "${path}/style_lib/upload/swfupload/swfupload_fp9.swf",
		

			custom_settings : {
				progressTarget : "fsUploadProgress1"//,
				//cancelButtonId : "btnCancel1"
			},
			
			// Debug Settings
			debug: false
		});
	
       });
       
	function mysubmit() {
		$("#form1").submit();
	}
</script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<!-- 内容 -->
	<div>
		<form method="post" action="${path}/ix/seal/destroy/destroy.htm" id="form1">
			<input type="hidden" name="seal_id" value="${seal._id}" />
			<input type="hidden" name="file_id" />
			<h2>
				<div>印章销毁</div>
			</h2>
			<table width="100%" class="lindex">
				<tr>
					<th align="right">印章编号：</th>
					<td align="left">
						${seal.true_code}
					</td>
					<th align="right">印章名称：</th>
					<td align="left">
						${seal.name}
					</td>
				</tr>
				<tr>
					<th align="right">刻章字样：</th>
					<td align="left">
						${mac.title}
					</td>
					<th align="right">印章类型：</th>
					<td align="left">
						${ma.name}
					</td>
				</tr>
				<tr>
					<th align="right">
						印章图片：
					</th>
					<td align="left" colspan="3">
						<img src='${path}/img/${seal.file_id}.htm?mh=150&mw=150'/>
					</td>
				</tr>
				<tr>
					<th align="right">
						见证人员：
					</th>
					<td align="left" style="width: 500px;">
						<textarea name="witness" rows="2" cols="50" maxlength="200"></textarea>
					</td>
					<th align="right">
						上传资料：
					</th>
					<td align="left">
						<div id="main_pic"></div>
						<div id="uploader-demo" style="float:left;">
						    <!--用来存放item-->
						    <div id="fileList" class="uploader-list"></div>
						    <div id="filePicker"></div>
						    
						</div>
						<div style="float:left;margin-top: 15px;margin-left:20px;">注：只可上传一份资料，若资料过多，请打包之后上传。</div>
					</td>
				</tr>
				<tr>
					<th align="right">备注：</th>
					<td align="left" colspan="3">
						<textarea name="verify_note" rows="5" cols="50" maxlength="255"></textarea>
					</td>
				</tr>
			</table>
			<div class="options">
				<a href="javascript:mysubmit();" class="asave"> 【销毁】 </a>
				<a href="javascript:goBack();" class="asave"> 【返回】 </a>
			</div>
		</form>
	</div>
</body>
</html>